package com.atguigu.gmall.all.controller;

import com.atguigu.gmall.order.client.OrderInfoFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Map;

/**
 * @author: 李旭
 * @create: 2021-09-10 15:16
 **/
@Controller
public class OrderInfoController {


    @Autowired
    private OrderInfoFeignClient orderInfoFeignClient;

    //去结算页面
    @GetMapping("/trade.html")
    public String toTrade(Model model){
        Map map = orderInfoFeignClient.getTradeData();
        model.addAllAttributes(map);
        //map.putAll(map
        //结算页面
        return "order/trade";
    }
}
